def  prostoe(z):
    for i in range(2,int(z**0.5)+1):
        if z%i==0:
            print("Непростое")
        else:
            print("Простое")
            break
clov=["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
a=input().split()
z=0
if len(a)==3:
    for i in range (3):
        if a[i] not in clov:
            print("Wrong input")
            break
else:
    print("Wrong input")
for i in range(10):
    if a[0]==clov[i]:
        z+=i*100
    if a[1]==clov[i]:
        z+=i*10
    if a[2]==clov[i]:
        z+=i*1
print(z)
prostoe(z)
              
                
